package com.itheima.controller;

import com.itheima.manager.PmsProductCategoryManager;
import com.itheima.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/productCategory")
public class PmsProductCategoryController {

    @Autowired
    PmsProductCategoryManager pmsProductCategoryManager;

    //查询产品分类
    @GetMapping("/list/withChildren")
    public R findAll(){
        return pmsProductCategoryManager.findAll();
    }

}
